package grape.workflow.rest.task.vo;

import grape.common.rest.vo.BaseVo;
import grape.common.service.trans.TransBy;
import grape.common.service.trans.impl.DatetimeTransServiceImpl;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 任务数据响应对象 自定义查询sql使用的vo,目前用于待签收任务列表
 * Created by yangwei
 * Created at 2020/6/17 11:52
 */
@Data
@EqualsAndHashCode(callSuper=false)
@ApiModel(value="任务数据响应对象")
public class TaskVo extends BaseVo {

    @ApiModelProperty(value = "任务id")
    private String taskId;

    @ApiModelProperty(value = "任务名称")
    private String taskName;

    @ApiModelProperty(value = "任务创建时间")
    private Date taskCreateTime;

    @ApiModelProperty(value = "任务表单标识")
    private String taskFormKey;

    @ApiModelProperty(value = "业务主键")
    private String businessKey;

    @ApiModelProperty(value = "流程实例id")
    private String processInstanceId;

    @ApiModelProperty(value = "流程定义id")
    private String processDefinitionId;

    @ApiModelProperty(value = "流程定义名称")
    private String processDefinitionName;

    @ApiModelProperty(value = "任务创建时间字符串")
    @TransBy(type = DatetimeTransServiceImpl.trans_datetime,byFieldName = "taskCreateTime")
    private String taskCreateTimeStr;
    /**
     * 流程开始时间
     */
    @ApiModelProperty(value = "流程开始时间")
    private Date processStartAt;

    @ApiModelProperty(value = "流程开始时间字符串")
    @TransBy(type = DatetimeTransServiceImpl.trans_datetime,byFieldName = "processStartAt")
    private String processStartAtTxt;
    /**
     * 流程结束时间，如果没有结束时间，说明流程尚未结束
     */
    @ApiModelProperty(value = "流程结束时间")
    private Date processEndAt;

    @ApiModelProperty(value = "流程结束时间字符串")
    @TransBy(type = DatetimeTransServiceImpl.trans_datetime,byFieldName = "processEndAt")
    private String processEndAtTxt;


    @ApiModelProperty(value = "第一条任务评论")
    private String firstCommentMessage;
}
